package com.qqt.csr.message.controller;

import com.qqt.csr.common.vo.resp.ObjectResponse;
import com.qqt.csr.message.response.MessageNotifyResponse;
import com.qqt.csr.message.service.MessageNotifyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: yang hao
 * @Date: 2024/12/11 14:33
 * @Description: 消息推送 接口
 **/
@Slf4j
@Tag(name = "消息推送")
@RestController
@RequestMapping("/notify")
public class MessageNotifyController {

    @Autowired
    private MessageNotifyService messageNotifyService;

    @GetMapping("/read")
    @Operation(summary = "站内信拉取")
    public ObjectResponse<List<MessageNotifyResponse>> list() {
        return ObjectResponse.success(messageNotifyService.readNotify());
    }

}
